In [1]:
Out[1]:
'C:\\Users\\svlsrao\\Documents\\First-Hackathon'
In [2]:
Out[2]:
(34226, 16)

To see whether the id numbers or unique or not

-we use the command data['id'].nunique(dropna=True)=> drop null values
In [3]:
Out[3]:
34226

select only the lat and log values of neighbourhood_group (Manhattan)

In [4]:
In [5]:
Out[5]:
array(['Private room'], dtype=object)
In [6]:

The above commands can be done using the following single command

In [7]:
In [8]:
In [9]:
Out[9]:
id name host_id host_name neighbourhood_group neighbourhood latitude longitude room_type price minimum_nights number_of_reviews last_review reviews_per_month calculated_host_listings_count availability_365
0 5728806 Large private room in Nolita 4271676 Nat Manhattan Nolita 40.72217 -73.99481 Private room 120 7 3 2015-09-01 0.06 3 0
14 5040218 LUX Blg-Prime Area! Lg PRIVATE RM & BATH w/VIEWS! 26019828 Sonia Manhattan Hell's Kitchen 40.76159 -73.99824 Private room 69 2 22 2019-03-20 0.64 2 7
23 20587133 Spacious, bright room in art-filled apartment! 116758734 Amos Manhattan Inwood 40.87085 -73.91830 Private room 59 4 19 2018-10-06 0.84 1 0
31 33682823 New York City Luxury Bedroom!! 224317184 Luke Manhattan Harlem 40.81652 -73.94914 Private room 215 5 7 2019-06-21 2.73 8 335
60 4926610 Panoramic City Views in Lux bldg 7537442 Loydeen Manhattan East Harlem 40.80315 -73.94017 Private room 50 7 25 2019-06-28 0.50 1 151
61 34483432 Manhattan Accommodation Across Central Park 260425153 Park Lane Manhattan Midtown 40.76427 -73.97618 Private room 375 1 1 2019-06-30 1.00 14 349
65 17702242 Stylish Private BR in the Upper East Side 10661558 Gio Manhattan Upper East Side 40.77349 -73.94994 Private room 129 1 117 2019-07-04 4.20 4 155
66 30269789 private room in apt near Fort Tryon Park. 87897420 Anne Manhattan Inwood 40.86171 -73.92945 Private room 65 4 1 2019-01-01 0.16 1 13
68 20147537 Paradise Room (Private Room) 142812843 Eugene Manhattan East Harlem 40.79104 -73.93805 Private room 75 1 12 2017-11-05 0.51 2 0
71 10390256 East Village Apartment 3078092 Amanda Manhattan East Village 40.73144 -73.98355 Private room 75 1 0 NaN NaN 1 0
77 36183003 Private bedroom withWiFi minutes from Central ... 82406306 Marc Manhattan East Harlem 40.80128 -73.93991 Private room 78 1 0 NaN NaN 2 13
81 10099517 Master room in a luxury apartment 16869971 Han Manhattan Roosevelt Island 40.76947 -73.94303 Private room 80 1 1 2016-01-05 0.02 2 0
82 18043457 Spacious Private Room in Nolita 15651644 Alan Manhattan Chinatown 40.71866 -73.99633 Private room 120 3 1 2017-05-21 0.04 1 0
88 25482581 Modern BR with Private Bathroom Near Central Park 146905275 Roberto Manhattan Upper West Side 40.77471 -73.98955 Private room 140 1 50 2019-07-02 3.71 1 69
93 18615898 Welcoming home in the ❤️ of NYC! 23867523 K Manhattan Theater District 40.76207 -73.98580 Private room 120 1 8 2019-05-31 2.09 1 5
99 4667146 Best value double room in New York B4 20559017 Yohan Manhattan East Harlem 40.78512 -73.94409 Private room 50 30 5 2018-12-30 0.11 9 330
106 31704075 Cozy Manhattan Room 153793156 Erika Manhattan Morningside Heights 40.81633 -73.96069 Private room 50 2 15 2019-06-20 3.60 1 2
118 11326009 Cozy SunLit Room Next To TimeSquare 13125944 Calvin Manhattan Hell's Kitchen 40.76510 -73.98854 Private room 79 1 2 2016-05-21 0.05 2 0
119 21883986 Cozy Room with queen size bed for 2 158710682 Cedar Manhattan Midtown 40.75298 -73.96912 Private room 90 1 0 NaN NaN 3 221
123 23324479 HARLEM HOME AWAY FROM HOME , SHORT - EXTENDED ... 120167980 Judith Manhattan Harlem 40.80497 -73.94952 Private room 125 1 7 2019-05-12 0.43 1 297

calculation of distance between two lat and long

In [10]:
In [11]:
0.7107359450568592
In [12]:
1.1195768514883917e-07 0.0006692015819676874 4.264821681880072
In [14]:
In [15]:
30/30 [01:10<00:00, 2.36s/it, Completed]
1/1 [00:17<00:00, 17.02s/it]
1/1 [00:11<00:00, 11.74s/it]
Out[15]:
In [ ]: